package org.tgcloud.group.core.fileUtils.waterMarkFileUtils;

import cn.hutool.core.convert.impl.DateConverter;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import lombok.*;
import lombok.experimental.Accessors;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.tgcloud.group.core.fileUtils.waterMarkFileUtils.picUtil.MyStringImageConverterUtil;
import org.tgcloud.group.core.fileUtils.waterMarkFileUtils.picUtil.MyUrlConverterUtil;

import java.net.URL;
import java.util.Date;
import java.util.List;

/**
 * @author: zhy
 * @create: 2023-08-25 13:28
 * @description:
 */
@Getter
@Setter
@EqualsAndHashCode
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER)
public class DemoData {
    @ExcelProperty("字符串标题")
    private String string;

    @ExcelProperty(value = "日期标题")
    private Date date;

    @ExcelProperty("数字标题")
    private Double doubleData;

    @ExcelProperty(value = "URL图片", converter = MyUrlConverterUtil.class)
    private List<URL> imageUrls;

//    地址必须是路径，不能是网络地址
    @ExcelProperty(value = "String图片", converter = MyStringImageConverterUtil.class)
    private List<String> imageStrings;

    /**
     * 忽略这个字段
     */
    @ExcelIgnore
    private String ignore;
}
